package com.lry.basic.redis;

import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.Socket;
import java.util.Scanner;

/**
 * @author:刘仁有
 * @desc:
 * @email:953506233@qq.com
 * @data:2019/8/6
 */
public class BioClient {
    public static void main(String[] args) throws IOException {
         Socket socket = new Socket();
         //非127.0.0.0和127.255.255.255即可
         socket.connect(new InetSocketAddress("127.0.0.1",9999));
         Scanner scanner = new Scanner(System.in);
         while(true){
             String next = scanner.next();
             socket.getOutputStream().write(next.getBytes());
         }
    }
}
